package com.happy3w.ssp.schoolmatehome.component.image.type.text;

import com.happy3w.ssp.schoolmatehome.component.image.Canvas;
import com.happy3w.ssp.schoolmatehome.component.image.LocationDrawAction;

import java.awt.Point;

public class TextAction extends LocationDrawAction {
    private final String text;

    public TextAction(String text, Point location) {
        super(location);
        this.text = text;
    }

    @Override
    public void draw(Canvas canvas) {
        canvas.drawText(text, location);
    }
}
